﻿
using SqlSugar;

namespace WH.Model.Bases
{
    /// <summary>
    /// 
    /// </summary>
    public abstract class BaseOrgAuditableEntity : BaseOrgEntity
    {
        /// <summary>
        /// 创建人
        /// </summary>
        [SugarColumn(ColumnName = "created_by", IsNullable = true, Length = 255, ColumnDescription = "创建人")]
        public virtual string? CreatedBy { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [SugarColumn(ColumnName = "created_time", IsNullable = true, ColumnDescription = "创建时间")]
        public virtual DateTime? CreatedTime { get; set; }

        /// <summary>
        /// 修改人
        /// </summary>
        [SugarColumn(ColumnName = "updated_by", IsNullable = true, Length = 50, ColumnDescription = "修改人")]
        public virtual string? UpdatedBy { get; set; }

        /// <summary>
        /// 修改时间
        /// </summary>
        [SugarColumn(ColumnName = "updated_time", IsNullable = true, ColumnDescription = "修改时间")]
        public virtual DateTime? UpdatedTime { get; set; }

        private string _organizationId = null!;
        /// <summary>
        /// 机构id
        /// </summary>           
        [SugarColumn(ColumnName = "organization_id", IsNullable = false, Length = 50, ColumnDescription = "机构id")]
        public override string OrganizationId
        {
            get
            {
                return _organizationId;
            }
            set
            {
                _organizationId = value;
            }
        }
    }
}
